<% content_for :page_title do %>
  <%= page_header_back_button spree.admin_product_path(@product) %>
  <span><%= Spree.t("digital_assets") %></span>
<% end %>

<% content_for :page_actions do %>
  <%= render_admin_partials(:digital_assets_actions_partials) %>
  <% if can?(:create, Spree::Digital.new(variant: @product.default_variant)) %>
    <%= link_to_with_icon "plus",
    Spree.t(:new_digital_asset),
    spree.new_admin_product_digital_asset_path(@product),
    class: "btn btn-primary",
    data: {
      turbo_frame: "dialog",
      action: 'dialog#open',
    } %>
  <% end %>
<% end %>

<%= render_admin_partials(:digital_assets_header_partials) %>

<div class="card p-0">
  <div class="card-body p-0">
    <div class="table-responsive" id="<%= dom_id(@product, :digital_assets) %>">
      <%= render "spree/admin/digital_assets/table" %>
    </div>
  </div>
</div>
